package cn.demomaster.quickui_sample.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

import cn.demomaster.quickrouter.activity.QuickActivity;
import cn.demomaster.quickui.annotation.ActivityPager;
import cn.demomaster.quickui.annotation.ResType;
import cn.demomaster.quickui_sample.R;
import cn.demomaster.quickui.ui.file.FileExplorerFragment;
import cn.demomaster.quickui.util.CrashHandler;

@ActivityPager(name = "异常捕获", preViewClass = TextView.class, resType = ResType.Resource)//,iconRes = R.drawable.ic_log_analysis)
public class CrashActivity extends QuickActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_crash);
        Intent intent = new Intent();
        Bundle bundle = new Bundle();
        bundle.putBoolean("finishWithActivity", true);
        bundle.putString("DIR_PATH_KEY", CrashHandler.getInstance().getCrashCacheDir().getAbsolutePath());
        intent.putExtras(bundle);
        startFragment(new FileExplorerFragment(), null, intent);
    }
}